'''
Created on Mar 18, 2012

@author: phuongdongbk
'''


class Queue():
    def __init__(self,list1=[]):
        self.list1 = list1
    def enqueue(self,a):
        self.list1.insert(0,a)
    def dequeue(self):
        self.list1 = list(self.list1[0:-1])
    def length(self):
        return len(self.list1)
    def first(self):
        return self.list1[0]
    
dong = Queue([1,2,3])
dong.enqueue(10)
dong.enqueue(20)
dong.enqueue(30)
print dong.list1

print dong.first()
dong.dequeue()
print dong.list1